import request from '@/utils/request'

export function getComments(articleId) {
  return request({
    url: `/article/getCommentsList/${articleId}`,
    method: 'get',
  })
}

export function addComments(articleId, data) {
  return request({
    url: `/comment/${articleId}`,
    method: 'post',
    data
  })
}


export function deleteComments(articleId) {
  return request({
    url: `/article/getCommentsList/${articleId}`,
    method: 'delete',
  })
}

export function putComments(articleId, data) {
  return request({
    url: `/article/getCommentsList/${articleId}`,
    method: 'put',
    data
  })
}
